package yxy.game.pm2.bean.db.po;


import yxy.apple.db.ResultObjectBuilder;

import java.util.Date;


public class OrderInfoPo {
    private String pCode;            //玩家唯一code
    private int goodsId;            //商品id
    private int serverId;            //服务器id
    private String myOrderId;        //我方订单id
    private String platOrderId;        //平台订单id+
    private int goodsPrice;            //商品价格 分
    private int payaMount;            //实际充值金额   单位分
    private int actType;            //活动类型
    private int orderState;            //订单状态
    private String channel;            //平台渠道
    private Date orderCreateTime;    //订单创建时间
    private Date upDateTime;        //更新时间
    private String curs;        //奖励信息 		jsonarray[json,json]    josn:keys:rewardtype,rewardid,rewardnum
    private int addVipExp;            //奖励vip经验
    private Long saveToDbTime;         //更新到数据库的时间


    public static ResultObjectBuilder<OrderInfoPo> builder = rs -> {
        OrderInfoPo u = new OrderInfoPo();
        u.setpCode(rs.getString("pCode"));
        u.setGoodsId(rs.getInt("goodsId"));
        u.setServerId(rs.getInt("serverId"));
        u.setMyOrderId(rs.getString("myOrderId"));
        u.setPlatOrderId(rs.getString("platOrderId"));
        u.setGoodsPrice(rs.getInt("goodsPrice"));
        u.setPayaMount(rs.getInt("payaMount"));
        u.setActType(rs.getInt("actType"));
        u.setOrderState(rs.getInt("orderState"));
        u.setChannel(rs.getString("channel"));
        u.setOrderCreateTime(rs.getTimestamp("orderCreateTime"));
        u.setUpDateTime(rs.getTimestamp("upDateTime"));
        u.setCurs(rs.getString("curs"));
        u.setAddVipExp(rs.getInt("addVipExp"));
        u.setSaveToDbTime(rs.getLong("saveToDbTime"));
        return u;
    };




    public Long getSaveToDbTime() {
        return saveToDbTime;
    }

    public void setSaveToDbTime(Long saveToDbTime) {
        this.saveToDbTime = saveToDbTime;
    }

    public String getpCode() {
        return pCode;
    }

    public void setpCode(String pCode) {
        this.pCode = pCode;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public int getServerId() {
        return serverId;
    }

    public void setServerId(int serverId) {
        this.serverId = serverId;
    }

    public String getMyOrderId() {
        return myOrderId;
    }

    public void setMyOrderId(String myOrderId) {
        this.myOrderId = myOrderId;
    }

    public String getPlatOrderId() {
        return platOrderId;
    }

    public void setPlatOrderId(String platOrderId) {
        this.platOrderId = platOrderId;
    }

    public int getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(int goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public int getPayaMount() {
        return payaMount;
    }

    public void setPayaMount(int payaMount) {
        this.payaMount = payaMount;
    }

    public int getActType() {
        return actType;
    }

    public void setActType(int actType) {
        this.actType = actType;
    }

    public int getOrderState() {
        return orderState;
    }

    public void setOrderState(int orderState) {
        this.orderState = orderState;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public Date getOrderCreateTime() {
        return orderCreateTime;
    }

    public void setOrderCreateTime(Date orderCreateTime) {
        this.orderCreateTime = orderCreateTime;
    }

    public Date getUpDateTime() {
        return upDateTime;
    }

    public void setUpDateTime(Date upDateTime) {
        this.upDateTime = upDateTime;
    }

    public String getCurs() {
        return curs;
    }

    public void setCurs(String curs) {
        this.curs = curs;
    }

    public int getAddVipExp() {
        return addVipExp;
    }

    public void setAddVipExp(int addVipExp) {
        this.addVipExp = addVipExp;
    }

    @Override
    public String toString() {
        return "OrderInfoPo{" +
                "pCode='" + pCode + '\'' +
                ", goodsId=" + goodsId +
                ", serverId=" + serverId +
                ", myOrderId='" + myOrderId + '\'' +
                ", platOrderId='" + platOrderId + '\'' +
                ", goodsPrice=" + goodsPrice +
                ", payaMount=" + payaMount +
                ", actType=" + actType +
                ", orderState=" + orderState +
                ", channel='" + channel + '\'' +
                ", orderCreateTime=" + orderCreateTime +
                ", upDateTime=" + upDateTime +
                ", curs='" + curs + '\'' +
                ", addVipExp=" + addVipExp +
                ", saveToDbTime=" + saveToDbTime +
                '}';
    }
}
